package com.liruo.demojsrjpa.repository;

import com.liruo.demojsrjpa.model.entity.DmlEntity;
import java.util.UUID;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public interface ModifyingMethodRepository extends
    JpaRepository<DmlEntity, UUID> {
  @Modifying
  @Query("update DmlEntity  set name = :name where id = :id")
  int updateNameById(@Param("id") String id, @Param("name") String name);
}
